1. Field of the Invention
The present invention relates to an image processing method and an image processing apparatus for carrying out tone correction processing on image data obtained by a digital camera, and to a computer-readable recording medium storing a program to cause a computer to execute the image processing method. The present invention also relates to a method of generating tone conversion tables used for carrying out the tone correction processing on the image data, and to a method of generating a model color characteristic profile used for carrying out color correction processing on the image data.
2. Description of the Related Art
An image obtained by a digital camera is recorded as digital image data in an internal memory installed in the digital camera or in a recording medium such as an IC card, and the image can be displayed by using a printer or a monitor based on the digital image data that have been recorded. In the case where such an image obtained by a digital camera is printed, the image is expected to have as high a quality as a print generated from a negative film.
A digital camera comprises an optical system (such as a diaphragm of a lens, a shutter, and a flash), an imaging system (such as CCDs and a signal processing system), a control system (AE, AWB, and AF mechanisms), and a recording and reproduction system (for compression/decompression, memory control, and display) . As factors affecting quality of a reproduced image, color temperature of the flash, AE (automatic exposure control) processing, AWB (automatic white balance) processing, CCD color separation filters, the number of pixels, tone conversion, and matrix operation for obtaining luminance/color difference signals can be listed, in addition to performance of the lens. In a digital camera, acquisition of digital image data enabling reproduction of a high quality image is aimed for by controlling these factors.
Therefore, a digital camera has an AE function, an AWB function, and image processing functions such as tone conversion and color correction. Since digital image data obtained thereby have been subjected to the image processing described above, a reproduction apparatus can reproduce an image represented by the image data. However, AE processing and AWB processing is generally carried out in a digital camera for reproduction of image data on a monitor, and AE processing or AWB processing may not be available in some cases. Furthermore, image data may have been generated by inappropriate exposure such as overexposure, underexposure, or inappropriate flashing. Therefore, when the image data are printed, tone correction and AE/AWB processing appropriate for printing are necessary. Here, the AE/AWB processing at the time of printing is called printing AE/AWB processing, for distinction from an AE processing function and an AWB processing function in the digital camera.
For this processing, a method of correcting exposure and white balance has been proposed. In this method, an average is found for each of RGB color signals comprising image data obtained by a digital camera, as has been described in Japanese Unexamined Patent Publication No. 11(1999) -220619, for example. A correction value for causing the average to become a target value appropriate for printing is then found. By using the correction value, exposure and white balance can be adjusted.
Meanwhile, as the factors affecting a quality of a reproduced image, color temperature of a flash, AE processing, AWB processing, CCD color separation filters, the number of pixels, tone conversion, and matrix operation for obtaining luminance/color difference signals can be listed. These factors vary depending on a model or manufacturer of a digital camera, and the tone conversion is deeply related to the printing AE/AWB processing. In the above method, image data used for the printing AE/AWB processing may be image data converted into antilogarithms from original image data obtained by a digital camera, or image data having been subjected to density conversion. Therefore, the image data having a tone characteristic depending on a model of the digital camera are analyzed by the printing AE/AWB processing.
For this reason, a correction value used for printing is hard to obtain, since the image data to be analyzed depend on the model of the digital camera when the printing AE/AWB processing is carried out. As a result, printing needs to be carried out repeatedly by a printer to correct the image data by trial and error, which is extremely inefficient.
As for colors, since a color characteristic varies with a model of a digital camera, a reproduced image has the color characteristic of the model of the digital camera when printed by a printer.
Therefore, for tone correction, a method of carrying out image processing according to a model of a digital camera has been described in Japanese Unexamined Patent Publication No. 10(1998)-208034, for example. In this method, more tones are assigned to an are a having a high luminance distribution density by analyzing an image, and tone conversion tables are automatically generated for each image in this manner.
Furthermore, a system for carrying out image processing on image data obtained by a digital camera by finding image processing conditions different for each model of a digital camera has been proposed in Japanese Unexamined Patent Publication No. 11(1999)-220687.
Regarding correction of a color characteristic varying with a model of a digital camera, a profile comprising 3D conversion tables for R, G, and B is generated by conventional color management software when image data obtained by a digital camera are converted into a signal output to an output apparatus such as a printer. By this conversion using the profile, image data not affected by the color characteristic of the digital camera are obtained. The profile comprises data for converting an input signal obtained by the digital camera into calorimetric values of a subject.
Moreover, another method for setting a color correction function by using a color chart after adjustment of gray balance using a gray chart has also been proposed in Japanese Unexamined Patent Publication No. 11(1999)-69186.
In the field of printing, image data are obtained by a device such as a scanner, and processing to eliminate an effect of tone and color characteristics of the device is necessary when the image data are output from an output apparatus such as a printer. In this field, the tone characteristic and the color characteristic of the device have been conventionally corrected by using two methods. In one of the methods, profiles for correcting tone characteristics and color characteristics of respective devices are stored in a memory of an image processing apparatus, and information on a model of the device is input to the image processing apparatus. The image processing apparatus selects one of the profiles based on the device information to carry out the tone correction and the color correction on the image data. In the other method, a profile for correcting a tone characteristic and a color characteristic of a device such as a scanner is output from the device to an image processing apparatus, together with image data. The image processing apparatus carries out tone correction and color correction based on the profile accompanying the image data.
However, in the system described in Japanese Unexamined Patent Publication No. 11(1999)-220687, printing AE/AWB processing according to a model of a digital camera is not mentioned. Furthermore, when tone correction is carried out on image data in the system, a tone correction processing condition is determined according to the model of the digital camera so that the tone correction processing condition is used in tone correction according to the model of the digital camera and in tone correction for printing. Therefore, printing AE/AWB processing is not carried out on the image data after the tone correction. Consequently, the image data to be processed in this system are limited to only the image data obtained by the digital camera. As a result, an appropriate correction value is not found for printing and an effect of printing AE/AWB processing is not expected. For this reason, a high-quality reproduced image cannot be obtained.
In the system described in Japanese Unexamined Patent Publication No. 10(1998)-208034, since only image analysis information is used for generating the tone conversion tables, an image generated by using the tables may not be appropriately processed.
For color correction, the conventional color management software corrects the color characteristic varying with the model of the digital camera by converting the input signal obtained by the digital camera into the calorimetric values of the subject. Therefore, when the color characteristic of the digital camera is substantially different from a color characteristic of the subject, an image after the color correction has a partially sparse area in a color space, easily ruining colors, especially in gradation.
In the method described in Japanese Unexamined Patent Publication No. 11(1999)-69186, absorption of a tone characteristic of a digital camera is not emphasized but correction of gray balance and colors is weighted. Therefore, a tone characteristic of a digital camera is not corrected and remains in image data.
In one of the image processing methods in printing, the model of the device such as a scanner that obtained the image data needs to be input. Therefore, an operator who carries out the image processing is assumed to know the model of the device. In the field of printing, the device such as a scanner is generally located near an image processing apparatus, and the model thereof does not change frequently. Therefore, the operator easily understands the model of the device. However, digital cameras have much wider varieties of models and the models change frequently. Moreover, a digital camera that obtained image data to be processed is not necessarily located in a laboratory for printing. Therefore, it is not practical for the operator to know the model of the digital camera. Furthermore, since an amount of data of the profile is large, in a system for processing images obtained by digital cameras by transferring the images via a network, the other method used in printing, that is, the method of outputting the profile together with image data to an image processing apparatus, is not practical.